# -*- coding:utf-8 -*-
# 作者：mushroom
# E-Mail : linzhanyu@gmail.com

# 抓取网页的内容

import urllib2
import base64 as b

class WebSpider :
    def GetContent( self, html ):
        url = b.b64decode( html.url )
        request = urllib2.urlopen( url )
        if html.coding == None :
            content = request.read()
        else:
            content = request.read().decode(html.coding)
        return content


